<template>
  <el-card class="card">
    <el-form ref="form"
             :model="form"
             label-width="150px">
      <el-form-item label="事件标题">
        <el-input v-model="form.title"
                  class="small-size"></el-input>
      </el-form-item>
      <el-form-item label="事件地址">
        <el-input v-model="form.address"
                  class="small-size"></el-input>
      </el-form-item>
      <el-form-item label="事件时间">
        <el-date-picker v-model="form.eventTime"
                        type="date"
                        placeholder="选择日期">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="事件上报人"
                    class="small-size">
        <el-input v-model="form.incidentReporter"></el-input>
      </el-form-item>
      <el-form-item label="上报人联系方式"
                    class="small-size">
        <el-input v-model="form.contactInformation"></el-input>
      </el-form-item>
      <el-form-item label="事件描述">
        <el-input type="textarea"
                  :autosize="{ minRows: 2, maxRows: 5}"
                  class="long-size"
                  v-model="form.describe"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary"
                   @click="onSubmit">确认上报</el-button>
        <el-button>取消</el-button>
      </el-form-item>
    </el-form>
  </el-card>
</template>

<script>
export default {
  data() {
    return {
      form: {
        title: "",
        address: "",
        eventTime: "",
        incidentReporter: "", // 事件上报人
        contactInformation: "", // 事件上报人联系方式
        describe: "",
        file: ""
      }
    };
  }
};
</script>

<style scoped>
.card {
  width: 55vw;
  margin: 0 auto;
}
.small-size {
  width: 300px;
}
.long-size {
  width: 500px;
}
</style>